package com.yanqu.road.server.cmd.activity.douluodalu;

import com.yanqu.road.logic.pb.DouLuoDaLuPb;
import com.yanqu.road.pb.activity.douluodalu.DouLuoDaLuProto;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.douluodalu.CrossDouLuoDaLuMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_DOU_LUO_DA_LU_UPLOAD_EVENT_NOTICE_RECORD,desc = "上传森林事件日志")
public class CrossDouLuoDaLuUploadEventNoticeCmd extends CrossUnionCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

        DouLuoDaLuProto.DouLuoDaLuUploadEventNoticeMsg reqMsg = DouLuoDaLuProto.DouLuoDaLuUploadEventNoticeMsg.parseFrom(packet.getBytes());

        CrossDouLuoDaLuMgr.addEventNotice(reqMsg.getActivityId(), packet.getPlayerId(), DouLuoDaLuPb.parseDouLuoDaLuEventNoticeData(reqMsg.getEventNotice()));

    }

    @Override
    public void sendData() {

    }
}
